package com.sherlockHolmes.init.base.utils;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class CronUtil {
    public static String onlyOnce(String dateStr) {
        LocalDateTime time = LocalDateTime.parse(dateStr, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
        String cronStr = time.format(DateTimeFormatter.ofPattern("ss mm HH dd MM ? yyyy"));
        return cronStr;
    }
}
